from dingtalkchatbot.chatbot import DingtalkChatbot
from ToolUtils import Constant

'''
钉钉报警直接引用dingtalkchatbot
先初始化机器人
xiaoding = DingtalkChatbot(webhook,secret)
根据发送内容进行传参
xiaoding.send_text(msg='我是机器人！', is_at_all=True)
以下是示例
'''

if __name__ == '__main__':

    # 初始化机器人小丁
    xiaoding = DingtalkChatbot(Constant.webhook_test, secret=Constant.secret_test)
    # Text消息@所有人
    xiaoding.send_text(msg='我是机器人！', is_at_all=True)
    # Link消息
    xiaoding.send_link(title='我是机器人', text='我是机器人', message_url='https:xxx.com')
    # #send_action_card
    # xiaoding.send_action_card()
    # # send_feed_card
    # xiaoding.send_feed_card()
    # # send_image
    # xiaoding.send_image()
    # # Markdown消息@所有人
    # xiaoding.send_markdown()
